package itdep.domain.division;


import javax.persistence.*;
import java.util.Date;
import java.util.Set;

/**
 * @author Ivan Khalopik
 * @version $Revision: 9 $ $Date: 2010-06-15 22:29:57 +0000 (Tue, 15 Jun 2010) $
 */
@Entity
@DiscriminatorValue(value = "2")
public class Faculty extends Department {

	@Column(name = "DIPLOMA_DATE", nullable = true)
	private Date diplomaDate;

	@ManyToOne
	@JoinColumn(name = "ID_SECRETARY", nullable = true)
	private Employee secretary;

	@OneToMany(mappedBy = "faculty")
	private Set<Speciality> specialities;

	public Faculty() {
		super(DepartmentType.FACULTY);
	}

	public Date getDiplomaDate() {
		return diplomaDate;
	}

	public void setDiplomaDate(Date diplomaDate) {
		this.diplomaDate = diplomaDate;
	}

	public Employee getSecretary() {
		return secretary;
	}

	public void setSecretary(Employee secretary) {
		this.secretary = secretary;
	}

	public Set<Speciality> getSpecialities() {
		return specialities;
	}

	public void setSpecialities(Set<Speciality> specialities) {
		this.specialities = specialities;
	}
}